Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags. |
Running the TurtleBot Simulator
Description: This tutorials demonstrates how to start the TurtleBot simulator and drive the TurtleBot in simulation.Keywords: simulation, TurtleBot
Tutorial Level: BEGINNER
Roslaunch the Simulation
To start the TurtleBot simulator, simply roslaunch the TurtleBot in to an empty world:
roslaunch turtlebot_gazebo turtlebot_empty_world.launch
You will see a gazebo window appear with a TurtleBot loaded.
Command the TurtleBot
Let's command the TurtleBot to drive in a circle:
rostopic pub -r 5 cmd_vel geometry_msgs/Twist '[0.1, 0, 0]' '[0, 0, 0.2]'
The above command publishes the twist command at a rate of 5Hz because the TurtleBot will timeout a velocity command if it does not receive a new command with in 0.6 seconds of the last command.
Alternatively you can use interactive markers to drive the TurtleBot by following this tutorial: turtlebot_interactive_markers/Tutorials/UsingTurtlebotInteractiveMarkers.
Continue to the next tutorial: Building a Map in TurtleBot Simulator